Optimal. Leaf size=37 \[ \frac{\tanh ^{-1}(\sin (c+d x))}{2 a d}-\frac{1}{2 d (a \sin (c+d x)+a)} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.0505354, antiderivative size = 37, normalized size of antiderivative = 1., number of steps used = 4, number of rules used = 3, integrand size = 19, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.158, Rules used = {2667, 44, 206} \[ \frac{\tanh ^{-1}(\sin (c+d x))}{2 a d}-\frac{1}{2 d (a \sin (c+d x)+a)} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 2667
Rule 44
Rule 206
Rubi steps
\begin{align*} \int \frac{\sec (c+d x)}{a+a \sin (c+d x)} \, dx &=\frac{a \operatorname{Subst}\left (\int \frac{1}{(a-x) (a+x)^2} \, dx,x,a \sin (c+d x)\right )}{d}\\ &=\frac{a \operatorname{Subst}\left (\int \left (\frac{1}{2 a (a+x)^2}+\frac{1}{2 a \left (a^2-x^2\right )}\right ) \, dx,x,a \sin (c+d x)\right )}{d}\\ &=-\frac{1}{2 d (a+a \sin (c+d x))}+\frac{\operatorname{Subst}\left (\int \frac{1}{a^2-x^2} \, dx,x,a \sin (c+d x)\right )}{2 d}\\ &=\frac{\tanh ^{-1}(\sin (c+d x))}{2 a d}-\frac{1}{2 d (a+a \sin (c+d x))}\\ \end{align*}
Mathematica [A] time = 0.039131, size = 30, normalized size = 0.81 \[ \frac{\tanh ^{-1}(\sin (c+d x))-\frac{1}{\sin (c+d x)+1}}{2 a d} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A] time = 0., size = 54, normalized size = 1.5 \begin{align*} -{\frac{\ln \left ( \sin \left ( dx+c \right ) -1 \right ) }{4\,da}}-{\frac{1}{2\,da \left ( 1+\sin \left ( dx+c \right ) \right ) }}+{\frac{\ln \left ( 1+\sin \left ( dx+c \right ) \right ) }{4\,da}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A] time = 0.938124, size = 63, normalized size = 1.7 \begin{align*} \frac{\frac{\log \left (\sin \left (d x + c\right ) + 1\right )}{a} - \frac{\log \left (\sin \left (d x + c\right ) - 1\right )}{a} - \frac{2}{a \sin \left (d x + c\right ) + a}}{4 \, d} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A] time = 1.63636, size = 163, normalized size = 4.41 \begin{align*} \frac{{\left (\sin \left (d x + c\right ) + 1\right )} \log \left (\sin \left (d x + c\right ) + 1\right ) -{\left (\sin \left (d x + c\right ) + 1\right )} \log \left (-\sin \left (d x + c\right ) + 1\right ) - 2}{4 \,{\left (a d \sin \left (d x + c\right ) + a d\right )}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F] time = 0., size = 0, normalized size = 0. \begin{align*} \frac{\int \frac{\sec{\left (c + d x \right )}}{\sin{\left (c + d x \right )} + 1}\, dx}{a} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A] time = 1.56881, size = 78, normalized size = 2.11 \begin{align*} \frac{\frac{\log \left ({\left | \sin \left (d x + c\right ) + 1 \right |}\right )}{a} - \frac{\log \left ({\left | \sin \left (d x + c\right ) - 1 \right |}\right )}{a} - \frac{\sin \left (d x + c\right ) + 3}{a{\left (\sin \left (d x + c\right ) + 1\right )}}}{4 \, d} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]